Remove a Specific Element from an Array in JavaScript by index